package Java常用类的学习;

public class StringHashCode {

    public static void main(String[] args) {
        Student s1=new Student("王",26);
        Student s2=new Student("李",25);
        Student s3=new Student("王",26);
        System.out.println(s1.hashCode());
        System.out.println(s2.hashCode());
        System.out.println(s3.hashCode());
        String str="I am 字符串";
        System.out.println(str.toString());
        System.out.println(s1);
    }


}
class Student{
    String name;
    int age;
    Student(String str,int i){
        name=str;
        age=i;
    }
}
